'use strict';
var even_asc_odd_desc = function(collection){
    let arr1=[];
    let arr2=[];
    for(let i of collection)
    {
        if(i%2===0)
        {
            arr1.push(i);
        }
        else
        {
            arr2.push(i);
        }
    }
  let result1=  arr1.sort(function(a, b) {
        return a - b;
      });
     let result2= arr2.sort(function(a, b) {
        return b- a;
      });
      return result1.concat(result2);

};
module.exports = even_asc_odd_desc;
